package com.ninth.element.generated.number.property;

import com.ninth.element.generated.number.NumberStarterConstants;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author LiYUJi
 **/
@ConfigurationProperties(prefix = NumberStarterConstants.NUMBER_MYSQL_DATASOURCE_PREFIX)
public class MysqlDatasourceWithNumberProperty {

    /**
     * 数据源类型 HikariDataSource 驱动为 SpringBoot2以后默认的数据源类型
     */
    private String type = "com.alibaba.druid.pool.DruidDataSource";
    /**
     * url --如果不存在则默认获取 spring.datasource.url
     */
    private String url;
    /**
     * 用户名 -- 如果不存在则默认获取 spring.datasource.username
     */
    private String username;
    /**
     * 密码 -- 如果不存在则默认获取 spring.datasource.password
     */
    private String password;
    /**
     * 驱动类型
     */
    private String driverClassName = "com.mysql.jdbc.Driver";

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDriverClassName() {
        return driverClassName;
    }

    public void setDriverClassName(String driverClassName) {
        this.driverClassName = driverClassName;
    }
}
